﻿using System;
using System.Collections.Generic;
using com.huigo.Framework.ServiceUtils;

namespace com.huigo.B2B.Web
{
    public partial class AddOrderSucceed : BasePage
    {
        public long orderId
        {
            get
            {
                string classId = Request.QueryString["id"];
                if (!string.IsNullOrEmpty(classId))
                {
                    try
                    {
                        return int.Parse(classId);
                    }
                    catch
                    {
                        return 0;
                    }
                }
                else
                {
                    return 0;
                }
            }
        }
        public string orderNo = string.Empty;
        public decimal orderPayAmount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (orderId > 0)
            {
                List<RequestFuncParams> list = new List<RequestFuncParams>();
                list.Add(new RequestFuncParams("orderId", orderId.ToString()));
                list.Add(new RequestFuncParams("custId", CustId.ToString()));
                BaseService service = new BaseService();
                ParserXml parser = service.RequestEntryService(Dict.ERequestFunc.GET_UNPAY_ORDER_INFO, list);
                if (parser != null && parser.RowsCount > 0)
                {
                    orderNo = parser["OrderNo", 0];
                    orderPayAmount = Convert.ToDecimal(parser["OrderPayAmount", 0]);
                }
                else
                {
                    PageRedirect();
                }
            }
            else
            {
                PageRedirect();
            }
        }
    }
}
